# RUN: clangd -lit-test < %s | FileCheck %s
{"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":123,"rootPath":"clangd","capabilities":{},"trace":"off"}}
---
{"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"test:///simple.cpp","languageId":"cpp","version":1,"text":"void foo(); void foo() {} int main() { foo(); }\n"}}}
---
{"jsonrpc":"2.0","id":1,"method":"textDocument/symbolInfo","params":{"textDocument":{"uri":"test:///simple.cpp"},"position":{"line":0,"character":40}}}
#      CHECK:    "containerName": null,
# CHECK-NEXT:    "declarationRange": {
# CHECK-NEXT:      "range": {
# CHECK-NEXT:        "end": {
# CHECK-NEXT:          "character": 8,
# CHECK-NEXT:          "line": 0
# CHECK-NEXT:        },
# CHECK-NEXT:        "start": {
# CHECK-NEXT:      		"character": 5,
# CHECK-NEXT:      		"line": 0
# CHECK-NEXT:    	 }
# CHECK-NEXT:      },
# CHECK-NEXT:      "uri": "file://{{.*}}/clangd-test/simple.cpp"
# CHECK-NEXT:    },
# CHECK-NEXT:    "definitionRange": {
# CHECK-NEXT:      "range": {
# CHECK-NEXT:        "end": {
# CHECK-NEXT:          "character": 20,
# CHECK-NEXT:          "line": 0
# CHECK-NEXT:        },
# CHECK-NEXT:        "start": {
# CHECK-NEXT:      		"character": 17,
# CHECK-NEXT:      		"line": 0
# CHECK-NEXT:    	 }
# CHECK-NEXT:      },
# CHECK-NEXT:      "uri": "file://{{.*}}/clangd-test/simple.cpp"
# CHECK-NEXT:    },
# CHECK-NEXT:    "id": "CA2EBE44A1D76D2A",
# CHECK-NEXT:    "name": "foo",
# CHECK-NEXT:    "usr": "c:@F@foo#"
---
{"jsonrpc":"2.0","id":3,"method":"shutdown"}
---
{"jsonrpc":"2.0","method":"exit"}
